home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
subscr_1.zip
/
SUBSCRIB.PPE
(
.txt
)
< prev
Wrap
PCBoard Programming Language Executable
|
1993-06-03
|
12KB
|
469 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Boolean BOOLEAN001
Boolean BOOLEAN002
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
Integer INTEGER009
Integer TINTEGER010(3)
Integer TINTEGER011(11,3)
String STRING001
String STRING002
String STRING003
String STRING004
String STRING005
String STRING006
String STRING007
String STRING008
String STRING009
String STRING010
String STRING011
String STRING012
String STRING013
String STRING014
String STRING015
String STRING016
String STRING017
String STRING018
String STRING019
String STRING020
String STRING021
String STRING022
String TSTRING023(11)
String STRING024
;------------------------------------------------------------------------------
TINTEGER010(1) = 25
TINTEGER010(2) = 50
STRING009 = "USA"
INTEGER009 = 60
STRING009 = "USA"
GetUser
STRING003 = U_Name()
STRING003 = Upper(STRING003)
STRING013 = STRING003
STRING017 = U_HVPhone
STRING012 = STRING017
STRING001 = U_Cmnt2
STRING001 = RTrim(STRING001, " ")
STRING021 = Right(STRING001, 6)
STRING001 = ""
:LABEL001
Cls
PrintLn "@X0EWe accept the following credit cards:"
PrintLn
PrintLn "@X0F (1) VISA"
PrintLn "@X0F (2) MasterCard"
PrintLn "@X0F (3) American Express/Optima"
PrintLn "@X0F"
PrintLn "@X0F (A) Abort, I don't have a Credit Card!"
PrintLn
InputStr "Enter the Credit Card Type for this order: (1/2/3/A)", STRING014, 14, 1, "123Aa", 10
PrintLn
If (STRING014 == "1") Goto LABEL003
If (STRING014 == "2") Goto LABEL004
If (STRING014 == "3") Goto LABEL005
STRING001 = "N"
Beep
PrintLn
InputYN "Are you sure you want to abort this script (Y/N)", STRING001, 12
If (STRING001 <> "Y") Goto LABEL001
PrintLn
Goto LABEL015
:LABEL002
Beep
PrintLn
PrintLn "@X8CThe card number you entered was invalid. Either you selected"
PrintLn "the wrong credit card type vs the card number entered, or you did"
PrintLn "failed to enter the proper number of digits. Please try again ..."
PrintLn "@X0E"
Gosub LABEL018
Goto LABEL001
:LABEL003
InputStr " Enter the VISA Card Number", STRING010, 14, 16, "1234567890", 2
PrintLn
If (Left(STRING010, 1) <> "4") Goto LABEL002
If ((Len(STRING010) == 13) || (Len(STRING010) == 16)) Goto LABEL006
Goto LABEL002
:LABEL004
InputStr " Enter the MasterCard Number", STRING010, 14, 16, "1234567890", 2
PrintLn
If (Left(STRING010, 1) <> "5") Goto LABEL002
If (Len(STRING010) <> 16) Goto LABEL002
Goto LABEL006
:LABEL005
InputStr " Enter the AMEX Card Number", STRING010, 14, 15, "1234567890", 2
PrintLn
If (Left(STRING010, 1) <> "3") Goto LABEL002
If (Len(STRING010) <> 15) Goto LABEL002
:LABEL006
InputStr " Expiration date (@X0CMMYY@X0E) format", STRING011, 14, 4, "1234567890", 2
PrintLn
If (Len(STRING011) == 4) Goto LABEL008
Beep
PrintLn
PrintLn "@X0CError in expiration date format! Please try again ..."
PrintLn "@X0E"
Goto LABEL006
:LABEL007
Beep
PrintLn
PrintLn "@X0CError in expiration date! Please try again ..."
PrintLn "@X0E"
Goto LABEL006
:LABEL008
INTEGER003 = Left(STRING011, 2)
INTEGER004 = "19" + Mid(STRING011, 3, 2)
INTEGER005 = Month(Date())
INTEGER006 = Year(Date())
If ((INTEGER003 > 12) || (INTEGER003 < 1)) Goto LABEL007
If (INTEGER004 > INTEGER006) Goto LABEL009
If ((INTEGER004 == INTEGER006) && (INTEGER003 >= INTEGER005)) Goto LABEL009
PrintLn
Beep
PrintLn "@X0CThat card has expired!"
PrintLn
PrintLn "@X0E Enter (R) to re-enter the card's expiration date."
PrintLn "@X0E Enter (D) to use a different credit card."
PrintLn "@X0E Enter (A) to abort this order and return."
PrintLn
STRING002 = "R"
InputStr "Your Choice: (R/D/A)", STRING002, 14, 1, "RDA", 14
PrintLn
If (STRING002 == "R") Goto LABEL006
If (STRING002 == "D") Goto LABEL001
Goto LABEL015
:LABEL009
InputText " Enter the Cardholder's Name", STRING013, 14, 50
PrintLn
STRING013 = Upper(STRING013)
STRING003 = STRING013
InputStr "Enter the Cardholder's Phone #", STRING012, 14, 13, "1234567890.-()/", 2
STRING017 = STRING012
Cls
PrintLn "@X0EYou have entered the following Credit Card information:"
PrintLn
If ((STRING014 == "1") && (Len(STRING010) == 13)) STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 3) + "-" + Mid(STRING010, 8, 3) + "-" + Mid(STRING010, 11, 3)
If ((STRING014 == "1") && (Len(STRING010) == 16)) STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 4) + "-" + Mid(STRING010, 9, 4) + "-" + Mid(STRING010, 13, 4)
If (STRING014 == "2") STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 4) + "-" + Mid(STRING010, 9, 4) + "-" + Mid(STRING010, 13, 4)
If (STRING014 == "3") STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 6) + "-" + Mid(STRING010, 11, 5)
STRING016 = Left(STRING011, 2) + "/" + Mid(STRING011, 3, 2)
Print "@X0F Credit Card #: "
PrintLn "@X07", STRING015
Print "@X0F Expiration Date: "
PrintLn "@X07", STRING016
Print "@X0FCardholders Name: "
PrintLn "@X07", STRING013
Print "@X0F Phone: "
PrintLn "@X07", STRING012
PrintLn
STRING001 = "Y"
InputYN "Is the above information correct (Y/N)", STRING001, 14
PrintLn "@X07"
If (STRING001 == "Y") Goto LABEL010
Goto LABEL001
:LABEL010
Cls
PrintLn "@X0FNow that we have valid credit card information, you need to complete"
PrintLn "your billing and shipping information. In order for the script to"
PrintLn "properly calculate your freight and other functions, you @X0AMUST@X0F enter"
PrintLn "your State/Province and Country in their appropriate fields. Please do"
PrintLn "@X0CNOT@X0F include your State and Zip (Postal) code in the 'City' field."
PrintLn
PrintLn "Customers from outside the US and Canada may need to use the 'Company'"
PrintLn "or 'City' fields in order to enter all of your information properly."
PrintLn
:LABEL011
If ((STRING021 == "") || (Left(STRING021, 1) == " ")) STRING021 = "None"
InputText "Customer # (if applicable)", STRING021, 14, 6
PrintLn
STRING021 = Upper(STRING021)
InputText "Purchaser Name", STRING003, 14, 50
STRING003 = Upper(STRING003)
PrintLn
InputStr " Voice Phone #", STRING017, 14, 13, "1234567890.-()/", 2
PrintLn
InputStr " FAX Phone #", STRING018, 14, 13, "1234567890.-()/", 2
PrintLn
InputText " Company Name", STRING004, 14, 50
STRING004 = Upper(STRING004)
PrintLn
InputText "Street Address", STRING005, 14, 50
STRING005 = Upper(STRING005)
PrintLn
InputText " City", STRING006, 14, 25
STRING006 = Upper(STRING006)
PrintLn
InputText "State/Province", STRING007, 14, 2
STRING007 = Upper(STRING007)
PrintLn
InputText " ZIP", STRING008, 14, 10
STRING008 = Upper(STRING008)
PrintLn
InputText " Country", STRING009, 14, 20
PrintLn
BOOLEAN001 = 0
STRING009 = Upper(STRING009)
If ((STRING009 == "USA") && (STRING007 == "")) Gosub LABEL013
If ((STRING009 == "") && (STRING007 == "")) Gosub LABEL013
If ((STRING009 == "USA") && (STRING007 == "")) Goto LABEL011
If ((STRING009 == "") && (STRING007 == "")) Goto LABEL011
If (STRING009 <> "USA") BOOLEAN001 = 1
If (STRING009 == "") BOOLEAN001 = 0
Cls
PrintLn "@X0EYou have entered the following purchaser information:"
PrintLn
Print "@X0F Customer Number: "
PrintLn "@X07", STRING021
Print "@X0F Customer Name: "
PrintLn "@X07", STRING003
Print "@X0F Voice Phone #: "
PrintLn "@X07", STRING017
Print "@X0F FAX Phone #: "
PrintLn "@X07", STRING018
If (STRING004 == "") Goto LABEL012
Print "@X0F Company: "
PrintLn "@X07", STRING004
:LABEL012
Print "@X0F Address: "
PrintLn "@X07", STRING005
Print "@X0F "
PrintLn "@X07" + STRING006 + ", " + STRING007 + " " + STRING008
Print "@X0F "
PrintLn "@X07", STRING009
PrintLn "@X07"
STRING001 = "Y"
InputYN "Is the above information correct (Y/N)", STRING001, 14
PrintLn
If (STRING001 == "Y") Goto LABEL014
PrintLn
Goto LABEL011
:LABEL013
Cls
Beep
PrintLn
PrintLn "@X0CYou must enter a valid State! Please re-enter your information ..."
PrintLn "@X0E"
Return
:LABEL014
Goto LABEL017
:LABEL015
PrintLn
Beep
PrintLn "@X0FScript Aborted. Returning to normal board operations ..."
Stop
:LABEL016
STRING002 = ""
Goto LABEL020
:LABEL017
Cls
INTEGER009 = 0
PrintLn
DispFile PPEPath() + "sprt.txt", 0
STRING002 = ""
InputStr "Support Order Selection: (1-2), (E)xit", STRING002, 14, 1, "12E", 10
PrintLn
If (STRING002 == "") Goto LABEL016
If (InStr("12", STRING002) < 1) Goto LABEL016
INTEGER009 = STRING002
If (STRING002 == "1") STRING022 = "Standard Support"
If (STRING002 == "2") STRING022 = "Extended Support"
STRING022 = STRING022 + " for $ "
PrintLn
Print "@X0FSupport Ordered: "
Print "@X07", STRING022
STRING024 = TINTEGER010(INTEGER009)
STRING024 = STRING024 + ".00"
PrintLn STRING024
PrintLn
STRING001 = "Y"
InputYN "Is the above correct (Y/N)", STRING001, 14
PrintLn
If (STRING001 == "N") Goto LABEL017
If (STRING002 == "1") Goto LABEL000
INTEGER007 = INTEGER007 + 1
TINTEGER011(INTEGER007, 1) = TINTEGER010(INTEGER009)
TSTRING023(INTEGER007) = STRING022 + STRING024
Goto LABEL016
:LABEL018
Wait
Return
:LABEL019
INTEGER001 = 0
INTEGER001 = INTEGER001 + TINTEGER011(INTEGER008, 1)
INTEGER002 = INTEGER001
Goto LABEL022
:LABEL020
BOOLEAN002 = 0
If (INTEGER007 <> 0) Goto LABEL021
Beep
PrintLn
PrintLn "@X0CNothing has been Ordered!"
PrintLn
Gosub LABEL018
Goto LABEL017
:LABEL021
Gosub LABEL019
PrintLn
STRING001 = "Y"
InputYN "Is the above information correct (Y/N)", STRING001, 14
PrintLn
If (STRING001 == "N") Goto LABEL017
:LABEL022
PrintLn
STRING001 = "N"
PrintLn "@X0EBefore actually saving your order, you can leave us two general comment lines"
InputYN "@X0Econcerning the placement of this order. Do you wish to do so (Y/N)", STRING001, 14
If (STRING001 <> "Y") Goto LABEL023
PrintLn
InputText "Comment 1: ", STRING019, 14, 50
PrintLn
InputText "Comment 2: ", STRING020, 14, 50
PrintLn
:LABEL023
Cls
DispFile PPEPath() + "legal.txt", 0
PrintLn
Print " @X0FWe will be charging your credit card in the amount of USD $ "
Print INTEGER002
PrintLn ".00"
PrintLn
STRING001 = "Y"
InputYN " Do you agree to this purchase (Y/N)", STRING001, 14
PrintLn
If (STRING001 <> "Y") Goto LABEL015
FPutLn 0, " User Info: ", U_Cmnt2
FPutLn 0, " Customer Number: ", STRING021
FPutLn 0, ""
FPutLn 0, " CREDIT CARD INFO."
FPutLn 0, " Credit Card #: ", STRING015
FPutLn 0, " Expiration Date: ", STRING016
FPutLn 0, " Cardholder's Name: ", STRING013
FPutLn 0, " Cardholder's Phone: ", STRING012
FPutLn 0, ""
FPutLn 0, " SOLD TO INFORMATION"
FPutLn 0, " Voice Phone: ", STRING017
FPutLn 0, " FAX Phone: ", STRING018
FPutLn 0, " Purchaser: ", STRING003
If (STRING004 <> "") FPutLn 0, " Company: ", STRING004
FPutLn 0, " Address: ", STRING005
FPutLn 0, " City/State/ZIP: ", STRING006, ", ", STRING007, " ", STRING008
FPutLn 0, " Country: ", STRING009
FPutLn 0, ""
FPutLn 0, "PRODUCTS/SERVICES ORDERED"
INTEGER008 = 1
:LABEL024
FPut 0, " Product # "
FPut 0, Right(INTEGER008, 2)
FPutLn 0, ": ", TSTRING023(INTEGER008)
INTEGER008 = INTEGER008 + 1
If (INTEGER008 <= INTEGER007) Goto LABEL024
FPutLn 0, ""
FPutLn 0, " #'s"
FPut 0, " Sub-Total: $ "
FPut 0, Right(INTEGER001, 5)
FPutLn 0, ".00"
FPut 0, " Grand Total: $ "
FPut 0, Right(INTEGER002, 5)
FPutLn 0, ".00"
FPutLn 0, " Agree to Charge: YES"
FPutLn 0, " Order Comment 1: ", STRING019
FPutLn 0, " Order Comment 2: ", STRING020
FPutLn 0, ""
FPutLn 0, ""
FPutLn 0, " Card Authorization #: _______________________"
FPutLn 0, ""
FPutLn 0, " Authorization Ref. #: _______________________"
End
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 1 End
; 7 Cls
; 1 Wait
; 47 Goto
; 64 Let
; 16 Print
; 100 PrintLn
; 42 If
; 2 DispFile
; 6 FPut
; 32 FPutLn
; 1 GetUser
; 10 InputStr
; 7 InputYN
; 5 Gosub
; 2 Return
; 1 Stop
; 11 InputText
; 8 Beep
;
;
; ■ Functions used :
;
; 38 +
; 35 ==
; 11 <>
; 2 <
; 1 <=
; 2 >
; 1 >=
; 7 &&
; 3 ||
; 7 Len(
; 10 Upper()
; 13 Mid()
; 10 Left()
; 4 Right()
; 1 InStr()
; 1 RTrim()
; 2 Date()
; 1 U_Name()
; 1 Year()
; 1 Month()
; 2 PPEPath()
;
;------------------------------------------------------------------------------
;
; Analysis flags : No flag
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 0 For/Next
; 0 While/EndWhile
; 0 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------